package com.bdilab.iot.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bdilab.iot.model.RolePermissionRelation;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author WangNing
 * @version 1.0
 * @date 2020/7/31 16:53
 */
@Mapper
public interface RolePermissionRelationMapper extends BaseMapper<RolePermissionRelation> {

    int insertBatch(List<RolePermissionRelation> relations);

    @Delete("delete from role_permission_relation where role_id = #{roleId}")
    void deleteByRoleId(Long roleId);

}
